﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="ErrorLogs.aspx.cs" Inherits="Admin_ErrorLogs" Title="Admin Page - Information Literacy Education" %>

<%@ Register TagPrefix="uc" TagName="UpdateProgress" Src="~/UserControls/UpdateProgress.ascx" %>
<%@ Register TagPrefix="uc" TagName="ModalPopupMessage" Src="~/UserControls/ModalPopupMessage.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <uc:ModalPopupMessage ID="ModalPopupMessage" runat="server" />
            <uc:UpdateProgress ID="updateProgress" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <h1>
        View ILE Error Logs
    </h1>
    <br />
    <div class="indent20">
        <asp:ObjectDataSource ID="ObjectDataSourceErrorLogs" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetLog_Errors" 
            TypeName="Log_ErrorBLL"></asp:ObjectDataSource>
        <asp:GridView ID="GridViewErrorLogs" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
            DataKeyNames="LogErrorID" DataSourceID="ObjectDataSourceErrorLogs" 
            ForeColor="#333333" GridLines="None" CssClass="MinWidth" PageSize="20">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="Username" HeaderText="Username" 
                    SortExpression="Username" />
                <asp:BoundField DataField="ErrorType" HeaderText="ErrorType" 
                    SortExpression="ErrorType" />
                <asp:BoundField DataField="Severity" HeaderText="Severity" 
                    SortExpression="Severity" />
                <asp:BoundField DataField="TimeStamp" HeaderText="TimeStamp" 
                    SortExpression="TimeStamp" />
            </Columns>
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        <br />
        <asp:ObjectDataSource ID="ObjectDataSourceErrorLog" runat="server" 
            InsertMethod="InsertLog_Error" OldValuesParameterFormatString="original_{0}" 
            SelectMethod="GetLog_Error" TypeName="Log_ErrorBLL">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridViewErrorLogs" Name="LogErrorID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:DetailsView ID="DetailsViewErrorLog" runat="server" CssClass="MinWidth" 
            AutoGenerateRows="False" CellPadding="4" 
            DataSourceID="ObjectDataSourceErrorLog" ForeColor="#333333" GridLines="None">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <Fields>
                <asp:BoundField DataField="Username" HeaderText="Username" 
                    SortExpression="Username" />
                <asp:BoundField DataField="AccountType" HeaderText="AccountType" 
                    SortExpression="AccountType" />
                <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                    SortExpression="FirstName" />
                <asp:BoundField DataField="LastName" HeaderText="LastName" 
                    SortExpression="LastName" />
                <asp:BoundField DataField="StudentIDNumber" HeaderText="StudentID#" 
                    SortExpression="StudentIDNumber" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:BoundField DataField="ErrorType" HeaderText="ErrorType" 
                    SortExpression="ErrorType" />
                <asp:BoundField DataField="ErrorMessage" HeaderText="ErrorMessage" 
                    SortExpression="ErrorMessage" HtmlEncode="False" 
                    HtmlEncodeFormatString="False" />
                <asp:BoundField DataField="OS" HeaderText="OS" SortExpression="OS" />
                <asp:BoundField DataField="Browser" HeaderText="Browser" 
                    SortExpression="Browser" />
                <asp:BoundField DataField="Severity" HeaderText="Severity" 
                    SortExpression="Severity" />
                <asp:BoundField DataField="TimeStamp" HeaderText="TimeStamp" 
                    SortExpression="TimeStamp" />
            </Fields>
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:DetailsView>
    </div>
</asp:Content>
